#pragma once
#include <cmath>
namespace RayTrace{
	class vector3
	{
	public:
		vector3(void);
		~vector3(void);
	public:
		float x,y,z;
	public:
	vector3::vector3(float _x,float _y,float _z);
	vector3 vector3::operator /(const float &b) const;
	vector3 vector3::operator *(const float b) const;
	friend vector3 operator *(float a,const vector3& b) ;
	vector3& vector3::operator +=(const vector3 &b);
	vector3 vector3::operator +(const vector3 &b) const ;
	vector3 vector3::operator -(const vector3 &b) const;
	float& operator [] (int n) ;
	float operator[] (int n ) const;

	vector3 vector3::Normalize() const;
	float  vector3::Length() const;
	static float  vector3::Dot(const vector3 &a,const vector3 &b);
	static double vector3::Distant(const vector3 &a,const vector3 &b);
	static vector3 vector3::Cross(const vector3 &a,const vector3 &b);
	static vector3 vector3::LimitInColorRange(const vector3 &a);
	static vector3 vector3::Reflect(vector3 in,vector3 normal);
	static vector3 vector3::Refract(vector3 in,vector3 normal,float n);
	static vector3 vector3::ZeroUnit;
	};
}
